package test.core;

public class Person {
    private String name = "张三";
    private int age = 18;

    public Person(){}

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public void sayHello(){
        System.out.println(name+":Hello");
    }
    public void sayHi(){
        System.out.println(name+":Hi");
    }
    public void watchTV(){
        System.out.println(name+":看电视");
    }
    public void playGame(){
        System.out.println(name+":玩游戏");
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
